package com.core.jdbc;

import java.lang.reflect.Proxy;

public class MySqlSession {


    // 获取getMapper
    public static <T> T getMapper(Class<T> clas) {
        try {
            return (T) Proxy.newProxyInstance(clas.getClassLoader(), new Class[]{clas},
                    new MySqlAopHandle<>(clas));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}
